-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KYLIN-3997: Add a health check job of Kylin #669
Conversation
Can one of the admins verify this patch? |
Codecov Report
@@ Coverage Diff @@
## master #669 +/- ##
============================================
- Coverage 25.78% 25.73% -0.06%
Complexity 6008 6008
============================================
Files 1382 1384 +2
Lines 82202 82374 +172
Branches 11519 11550 +31
============================================
- Hits 21198 21197 -1
- Misses 58958 59129 +171
- Partials 2046 2048 +2
Continue to review full report at Codecov.
|
@@ -0,0 +1,298 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @lshmouse , I found this java file is not formatted as expected. It looks like it is indented with two blank and it is different with other Java file, maybe you should check Setup IDE code formatter in http://kylin.apache.org/development/dev_env.html.
private void checkStoppedJob() throws Exception { | ||
reporter.log("## Cleanup stopped job"); | ||
// TODO: Add a config | ||
long outdatedJobTimeCut = System.currentTimeMillis() - 30 * 24 * 3600 * 1000L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like that 30 * 24 * 3600 * 1000L
is a magic number, could you please add these in KylinConfig?
long cubeDataSize = cube.getSizeKB() * 1024; | ||
double expansionRate = cubeDataSize / sizeRecordSize; | ||
if (sizeRecordSize > 500L * 1024 * 1024 * 1024) { | ||
if (expansionRate > 5.0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0
is also a magic number.
@@ -164,6 +164,10 @@ public CubeDesc reloadCubeDescQuietly(String name) { | |||
} | |||
} | |||
|
|||
public List<String> getErrorCubes() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is duplicated with getErrorCubes
in CubeManager.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it is never called anywhere.
I think it is a good feature, by this feature, Kylin's administrator needn't check metadata error in kylin.log or find useless cube manually. Some value such as ExpansionRate or Out of date should be configurable. |
Thanks for @hit-lacus 's review. I will update the pr asap. |
Format the code and compress the commits. Please help review the pr one more time, thanks~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine to me
See: https://issues.apache.org/jira/browse/KYLIN-3997